package com.dwin.dingnuo;


import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;

import com.dwin.dingnuo.utils.LocalManageUtil;

import org.litepal.LitePal;

import androidx.multidex.MultiDex;

/**
 * 鼎诺4G 联网app。
 */
public class DApplication extends Application {

    public static Context appContext;
    public static DApplication app;

    @Override
    public void onCreate() {
        super.onCreate();
        appContext = getApplicationContext();
        app = this;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(LocalManageUtil.setLocal(base));
        MultiDex.install(this);
        LitePal.initialize(this);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        LocalManageUtil.setLocal(this);
    }

}
